package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.Images;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/ImagesMapper.class */
public interface ImagesMapper {
    @Select({"select * from images where assets_id=#{aid} and type=#{type}"})
    @Results({@Result(property = "projectNo", column = "project_no"), @Result(property = "assetsId", column = "assets_id"), @Result(property = "createDate", column = "create_date")})
    Images findByAId(@Param("aid") int i, @Param("type") String str);

    @Insert({"insert into images (project_no,type,assets_id,connect,create_date) " +
            "values (#{projectNo},#{type},#{assetsId},#{connect},#{createDate})"})
    Integer add(Images images);

    @Update({"update images set connect = #{connect} where id = #{id} or assets_id = #{assetsId}"})
    int update(Images images);

    @Delete({"delete from images where id=#{id}"})
    Integer remove(int i);

    @Update({"update assets_images set connect = #{connect} " +
            "where assets_id = #{assetsId}"})
    Integer updateConnectByAssetsId(@Param("connect") String connect,
                                @Param("assetsId") Integer assetsId);
}